﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using condortravel.operaciones.core.DataModel;
using System.Data.Linq;

namespace condortravel.operaciones.persistence.operacionesImpl
{
    public class EstadoTourDAOImpl : condortravel.operaciones.persistence.Impl.GenericDAO<Tb_Estado_Tour, int>
    {


        public List<Tb_Estado_Tour> getListAll()
        {
            using (ImpersonationHelper imp = new ImpersonationHelper(this.Impersonation.User, this.Impersonation.Domain, this.Impersonation.Password))
            {
                if (IsImpersonate)
                {
                    if (!imp.ImpersonateUser())
                    {
                        throw new Exception("The Impersonate has failed");
                    }
                }
                using (DataContext dataContext = this.getInstanceDataContextFactory())
                {
                    return (from p in dataContext.GetTable<Tb_Estado_Tour>()
                            select p).ToList<Tb_Estado_Tour>();
                }
            }
        }

        public override Tb_Estado_Tour update(Tb_Estado_Tour entity)
        {
            throw new NotImplementedException();
        }

        public override Tb_Estado_Tour getByID(int id)
        {
            throw new NotImplementedException();
        }

        public override void delete(int pk)
        {
            throw new NotImplementedException();
        }
    }
}
